// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "SmartWorldExtensions.generated.h"

/**
 * 
 */
UCLASS()
class SMARTPYTHONEXTENSIONS_API USmartWorldExtensions : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static TArray<ULevel*> SmGetLevels(UWorld* World, bool bIsReference=true);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static const TArray<ULevelStreaming*>& SmGetStreamingLevels(UWorld* World);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static ULevel* SmGetCurrentLevel(UWorld* World);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static bool SmSetCurrentLevel(UWorld* World, ULevel* InLevel);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmSetAllLevelsLocked(UWorld* World, bool bIsLocked);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmSetAllLevelsVisible(UWorld* World, bool bIsVisible);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static ULevel* SmGetPersistentLevel(UWorld* World);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static bool SmCurrentIsPersistentLevel(UWorld* World);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmAddLevel(UWorld* World, FString PackageName);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static bool SmRemoveLevel(UWorld* World, ULevel* InLevel);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static TArray<AActor*> SmGetActors(UWorld* World, bool bIsSub=false);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static TArray<AActor*> SmFindActorsByLabel(UWorld* World, FString Label, bool bIsSub = false);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmCreateFolder(UWorld* World, FString Name);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmRenameFolder(UWorld* World, FString OldName, FString NewName);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static void SmAddActorsToFolder(UWorld* World, FString Name, TArray<AActor*> Actors);

	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static TArray<FString> SmGetAllFolders(UWorld* World);
	
	UFUNCTION(BlueprintCallable, Category = "World", meta = (ScriptMethod))
	static bool SmSave(UWorld* World);


};